home *** CD-ROM | disk | FTP | other *** search
/ Geek Games #12 / GEGA012.iso / eroticos / spermananalodyssea.swf / scripts / frame_8 / PlaceObject2_146_70 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Text File  |  2005-11-04  |  1KB  |  56 lines

  1. onClipEvent(enterFrame){
  2.    if(broken != true)
  3.    {
  4.       scrollSpeed = this._x / _root.mainGround.ground._width * maxScrollSpeed + 2;
  5.       if(fly == true && crashed != true)
  6.       {
  7.          yspeed -= 2;
  8.          gravity = 0.9;
  9.          scrollStart = true;
  10.          this._rotation = -5;
  11.       }
  12.       if(fly == false)
  13.       {
  14.          this._rotation = 1;
  15.       }
  16.       yspeed += gravity;
  17.       yspeed *= friction;
  18.       if(_Y + yspeed + _height / 2 >= _root.wall1._y)
  19.       {
  20.          _Y = _root.wall1._y - _height / 2;
  21.          broken = true;
  22.          yspeed = 0;
  23.          gravity = 0;
  24.          scrollStart = false;
  25.       }
  26.       else if(_root.wall3._y >= _Y + yspeed - _height / 2)
  27.       {
  28.          _Y = _root.wall3._y + _height / 2;
  29.          yspeed = - yspeed;
  30.       }
  31.       else
  32.       {
  33.          _Y = _Y + yspeed;
  34.       }
  35.       if(_X + xspeed + _width / 2 >= _root.wall2._x)
  36.       {
  37.          _X = _root.wall2._x - _width / 2;
  38.          xspeed = - xspeed;
  39.       }
  40.       else if(_root.wall4._x >= _X + xspeed - _width / 2)
  41.       {
  42.          _X = _root.wall4._x + _width / 2;
  43.          xspeed = - xspeed;
  44.       }
  45.       else
  46.       {
  47.          _X = _X + xspeed;
  48.       }
  49.       xspeed *= friction;
  50.    }
  51.    if(_root.restart == true)
  52.    {
  53.       this.removeMovieClip();
  54.    }
  55. }
  56.